﻿@model SDSystem.Models.Restaurant
@{
    ViewBag.Title = "Restaurant Detais";
    Layout = "~/Views/Shared/_LayoutMaps.cshtml";
}

<!DOCTYPE html>

<html>
    <head>
        @*<meta property="fb:app_id" content="186184241473914">*@
        <title>Details Restaurant</title>
        @*<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
        <script type="text/javascript">
            var map = null;
            var geocoder = null;

            function initialize() {
                if (GBrowserIsCompatible()) {
                    map = new GMap2(document.getElementById("map_canvas"));
                    map.setCenter(new GLatLng(37.4419, -122.1419), 1);
                    map.setUIToDefault();
                    geocoder = new GClientGeocoder();
                }
            }

            function showAddress(address) {
                if (geocoder) {
                    geocoder.getLatLng(
          address,
          function (point) {
              if (!point) {
                  alert(address + " not found");
              } else {
                  map.setCenter(point, 15);
                  var marker = new GMarker(point, { draggable: true });
                  map.addOverlay(marker);
                  GEvent.addListener(marker, "dragend", function () {
                      marker.openInfoWindowHtml(marker.getLatLng().toUrlValue(6));
                  });
                  GEvent.addListener(marker, "click", function () {
                      marker.openInfoWindowHtml(marker.getLatLng().toUrlValue(6));
                  });
                  GEvent.trigger(marker, "click");
              }
          }
        );
                }
            }
    </script>*@
    </head>
<body onload="initialize()" onunload="GUnload()">
    <b>Nhà hàng @Html.DisplayFor(m=>m.Name)</b>
    <div style="margin-bottom: 30px;">
        <div style="float:left;padding: 5px;">
            <img src=@Html.DisplayFor(m=>m.Image) alt="photo1" style="width: 200px;height: 150px;"/>
        </div>
            <i style="color:blue;">@Html.Raw(Model.Description)</i>
    </div>
    <p>@Html.Raw(Model.RContent)</p>
    <b>Địa chỉ:</b>
    <p>@Html.DisplayFor(m=>m.Street),@Html.DisplayFor(m=>m.City)</p>
    <b>Tìm trên bản đồ:</b>
    @*<form onsubmit="showAddress(this.address.value); return false">
      <p>
        <input type="text" style="width:350px" name="address" value="@ViewBag.MapsLocation">
        <input type="submit" value="Go!">
      </p>
      <div id="map_canvas" style="width: 480px; height: 320px; position: relative; background-color: rgb(229, 227, 223);"></div>
    </form>
    <div id="fb-root" style="margin:0 auto;"></div>
    <br/>
    <fb:comments href="http://www.dantri.com.vn" num-posts="10" width="480"></fb:comments>*@
</body>
</html>
